//
// Created by xili on 2024/8/4 9:26.
// Go big or go home.
//
#include <iostream>

using namespace std;

class Solution {
public:
    bool isValid(string word) {
        int n = word.size();
        if (n < 3) {
            return false;
        }
        bool yuan = false;
        bool fu = false;
        for (auto &item: word) {
            if (!isdigit(item) || !isalpha(item)) {
                return false;
            } else if (isYuan(item)) {
                yuan = true;
            } else if (!isdigit(item)) {
                fu = true;
            }
        }
        return yuan && fu;
    }

    bool isYuan(char c) {
        if (isupper(c)) {
            c = tolower(c);
        }
        return c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u';
    }
};